import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import { Message } from 'element-ui';
import less from 'less'
import axios from 'axios'
import 'element-ui/lib/theme-chalk/index.css'


// 远程后台地址
axios.defaults.baseURL = 'https://www.liulongbin.top:8888/api/private/v1/'

// 配置请求拦截器,使用 Token 认证
axios.interceptors.request.use(config=>{
  //  为请求头对象添加token验证
  config.headers.Authorization=window.sessionStorage.getItem('token')
  // 最后必须 return config
  return config
})
Vue.prototype.$http=axios

// 弹出消息提示框
Vue.prototype.$message=Message
Vue.config.productionTip = false

Vue.use(ElementUI)
Vue.use(less)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
